<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<jsp:include page="/WEB-INF/jspf/header.jsp">
    <jsp:param name="title" value="View Statements" />
</jsp:include>


<f:view>
    <h:form>
        
        <h:panelGrid columns="2" >

            <%@include file="/WEB-INF/jspf/menu_manager.jspf" %>
            <h:panelGroup>
                <h1><h:outputText value="View Statements" /></h1>
                <h:dataTable value="#{StatementAccountManagedBean.all}" var="item" rowClasses="evenRow, oddRow"  border="2" cellspacing="5" cellpadding="5">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Id"/>
                        </f:facet>
                        <h:outputText value="#{item.id}"/>
                    </h:column>

                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Account ID"/>
                        </f:facet>
                        <h:outputLink value="viewDetails.jsp">
                            <f:param  name="accountId" value="#{item.account.id}"/>
                            <h:outputText value="#{item.account.id}"/>
                        </h:outputLink>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Date"/>
                        </f:facet>
                        <h:outputText value="#{item.datum}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Time"/>
                        </f:facet>
                        <h:outputText value="#{item.cas}"/>
                    </h:column>
                </h:dataTable>
            </h:panelGroup>
        </h:panelGrid >
    </h:form>

    </body>

    </html>
</f:view>
